//
//  HotelContactCell.swift
//  DLuxTravel
//
//  Created by 陆涛 on 2018/11/27.
//  Copyright © 2018 imguider. All rights reserved.
//

import UIKit

class HotelContactCell: BaseCell {

    @IBOutlet weak var layerView: UIView!
    @IBOutlet weak var contactLabel: YYLabel!
    
    @IBOutlet weak var contactH: NSLayoutConstraint!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        setupUI()
    }
    
    private func setupUI() {
        
        configCell(.container)
        layerView.addShadow(.hotelDetail)
        
        contactLabel.numberOfLines = 0
        
    }
    
    var contact:NSAttributedString? {
        
        didSet {
            
            contactLabel.attributedText = contact
            let height = contactLabel.sizeThatFits(CGSize(width: (kScreenWidth - 96), height: 10000)).height
            contactH.constant = height
        }
    }
    
}
